import { VuexModule, Module, getModule, Mutation } from 'vuex-module-decorators'
import store from '@/store'

@Module({ dynamic: true, name: 'globalTool', store, namespaced: false })
class GlobalTool extends VuexModule {
  public previewDialog: boolean = false
  public previewFile: any = []

  @Mutation
  public setPreviewDialog (bool) {
    this.previewDialog = bool
  }

  @Mutation
  public setPreviewFile (arr) {
    this.previewFile = arr
  }
}

export const globalToolModule = getModule(GlobalTool)
